package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;

public class UserServiceImpl implements UserService {

//    注入基本数据类型
//    a,首先声明一个变量
    private int num;
//    b,然后再写一个set方法
    public void setNum(int num) {
        this.num = num;
    }

    private UserDao userDao;
    //1.对需要进行注入的变量添加set方法
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void save() {
        userDao.save();
        System.out.println("user service running..." + num);
    }
}
